package top.sxlai.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author : sxl
 * @date : 2024/4/12 14:21
 * @Version: 1.0
 */
public class CurrentSystemTime {

    public static String getTime() {
        Date date = new Date();
        //格式化时间
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.format(date);
    }

    public static void main(String[] args) {

        System.out.println(getTime());
    }
}
